﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Text;

namespace Lawyer.Web.Admin
{
    public partial class admin_postshow : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = Initial();
            if (!IsPostBack)
            {
                BindData(ID);
            }

        }

        private string Initial()
        {
            string ID = Request["ID"] == null ? null : Request["ID"].ToString();
            if (ID == null)
            {
                // Response.Redirect("admin_postadd.aspx");
                return null;
            }
            else
            {
                return ID;
            }
        }

        private void BindData(string id)
        {
            Lawyer.BLL.PostInfo model = new Lawyer.BLL.PostInfo();
            Lawyer.Model.PostInfo post = model.GetModel(id);
            txtTile.Text = post.Tile;
            txtDetail.Text = post.Detail;
        }
    }
}
